<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>{$title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Matthew Makins' online CV." />
<meta name="keywords" content="Matthew Makins, Matt Makins" />
<link href="templates/mattmakins.css" rel="stylesheet" type="text/css" />
<script type="text/javaScript" src="javascript/images.js"></script>
</head>

<body>
<div align="center">
<div id="pageDesign" align="center">

<!-- BANNER -->

<div id="banner"></div>

<!-- CONTENT -->
	
<div id="blogContent">
<p class="pageHeader">The Blog</p><hr />
	
{if $loggedIn}
<a href="new.php">New Entry</a> | 
<a href="addCategory.php">Add Category</a> 
{/if}

{foreach from=$posts item=post}
<p class="blogHeader">{$post.title}</p>
<p class="blogInfo">Posted by {$post.author} on {$post.date} in {$post.category}</p>
<p>{$post.message}</p>
<br/><br/>
Comments<br/><br/>
{foreach from=$comments item=comment}
{$comment.author} {$comment.date}<br/>
{$comment.text}
<br/><br/>
{/foreach}
<br/>
{if $post.comments}
<br/>
<p><b>Comment on this blog post.</b></p>
<form action="view.php" method="POST">
<input type="hidden" name="comment_post_id" Value="{$post.id}" /><table>
<tr>
<td>Name:</td>
</tr>
<tr>
<td><input type="text" style="border: 1px solid black;" name="commentor_name" /></td>
</tr>
<tr>
<td>Comment:<br/><i>You may use HTML tags for styling.</i></td> 
</tr>
<tr>
<td><textarea name="comment_text" rows="15" cols="50" style="border: 1px solid black;"></textarea> </td>
</tr>
</table><br/>
<input type="submit" value="Submit Your Comment" />
</form>
{/if}

{/foreach}

<br/>
</div>

<!-- CATEGORIES 

add category menu, include from an include file DRY!

<?php
  include('categoryMenu.php');
?>
-->
	

<!-- Footer include -->
{include file="footer.tpl"}
 
</div>
</body>
</html>
